<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">

<head th:include="css :: css">
</head>
<link href="/js/jquery.icheck/skins/square/blue.css" rel="stylesheet">
<link href="/css/bootstrap-toggle.min.css" rel="stylesheet">
<style>
    .fixed-table-toolbar .bs-bars, .fixed-table-toolbar .search, .fixed-table-toolbar .columns {
        margin-top: -70px;
    }
</style>
<body style="overflow: hidden;opacity: 1">

<div id="cl-wrapper" style="padding-top: 0">
    <div class="container-fluid">
        <div class="cl-mcont">
            <div class="row">
                <div class="col-md-12">
                    <div class="block-flat">
                        <form class="form-horizontal group-border-dashed" id="userListForm">
                            <input name="userIds" id="userIds" type="hidden"/>
                            <div class="form-group">
                                <div class="input-group">
                                    <input type="text" class="form-control" readonly placeholder="开始" id="startTime"
                                           name="startTime"/>
                                </div>
                                <div class="input-group">
                                    <input type="text" class="form-control" readonly placeholder="结束" id="endTime"
                                           name="endTime"/>
                                </div>
                                <div class="input-group">
                                    <input type="text" class="form-control" placeholder="会员编号/名称" id="account"
                                           name="account"/>
                                </div>
                                <div class="input-group">
                                    <input type="text" class="form-control" placeholder="产品经理" id="userPm"/>
                                </div>
                                <div class="input-group">
                                    <select class="form-control" id="status" name="status">
                                        <option value="">账号状态</option>
                                        <option value="0">关闭</option>
                                        <option value="1">开启</option>
                                    </select>
                                </div>
                                <div class="input-group">
                                    <select class="form-control" id="auditType" name="auditType">
                                        <option value="">供卡审核状态</option>
                                        <option value="INIT">未申请</option>
                                        <option value="AUDITING">审核中</option>
                                        <option value="SUCCESS">审核成功</option>
                                        <option value="FAIL">审核失败</option>
                                    </select>
                                </div>
                                <div class="input-group">
                                    <select class="form-control" id="supplyModel" name="supplyModel">
                                        <option value="">销卡模板</option>
                                    </select>
                                </div>
                                <div class="input-group">
                                    <select class="form-control" id="type" name="type">
                                        <option value="">用户来源</option>
                                        <option value="0">web</option>
                                        <option value="1">微信</option>
                                        <option value="2">app</option>
                                        <option value="3">易缴费</option>
                                    </select>
                                </div>
                                <div class="input-group">
                                    <select class="form-control" id="include" name="include">
                                        <option value="0">包含</option>
                                        <option value="1">剔除</option>
                                    </select>
                                </div>
                                <div class="input-group">
                                    <button class="btn btn-primary" type="button" id="search"><i
                                            class="fa fa-search"></i>查询
                                    </button>
                                    &nbsp;
                                    <button class="btn btn-success btn-operation" type="button" onclick="addUserFun(1)"
                                            id="addUser"><i class="fa fa-plus-square-o"></i> 新增会员
                                    </button>
                                    &nbsp;
                                    <button class="btn btn-warning btn-operation" type="button" onclick="addUserFun(2)"
                                            id="updateUser"><i class="fa fa-pencil"></i> 修改会员
                                    </button>
                                    &nbsp;
                                    <button class="btn btn-danger btn-operation" type="button"
                                            id="updateUserPrivilege"><i class="fa fa-pencil"></i> 修改会员权限
                                    </button>
                                    &nbsp;
                                    <div class="btn-group">
                                        <button data-toggle="dropdown" class="btn btn-primary dropdown-toggle">会员状态变更
                                            <span class="caret"></span>
                                        </button>
                                        <ul class="dropdown-menu" id="statusOperate">
                                            <li><a href="#" onclick="updateUserStatus('accountStatus',1)">启用帐号</a></li>
                                            <li><a href="#" onclick="updateUserStatus('accountStatus',0)">禁用帐号</a></li>
                                            <li><a href="#" onclick="updateUserStatus('apiState',1)">启用供卡接口</a></li>
                                            <li><a href="#" onclick="updateUserStatus('apiState',0)">禁用供卡接口</a></li>
                                            <li><a href="#" onclick="updateUserStatus('equityApiState',1)">启用权益接口</a>
                                            </li>
                                            <li><a href="#" onclick="updateUserStatus('equityApiState',0)">禁用权益接口</a>
                                            </li>
                                        </ul>
                                    </div>
                                    &nbsp;
                                    <button class="btn btn-info btn-operation" type="button"
                                            id="resetUserLoginPwd"><i class="fa fa-pencil"></i> 重置会员登录密码
                                    </button>
                                    &nbsp;
                                    <button class="btn btn-warning btn-warning" type="button"
                                            id="autoAsyn"><i class="fa fa-unlock-alt"></i>开启异步
                                    </button>
                                    &nbsp;
                                    <button class="btn btn-warning btn-warning" type="button"
                                            id="updateEquityCredit"><i class="fa fa-pencil"></i>修改权益信用分
                                    </button>
                                    &nbsp;
                                    <span id="commissionStatus">
                                            <input type="checkbox" data-onstyle="danger" data-offstyle="warning"
                                                   name="commissioninclude" id="commissioninclude"
                                                   data-on="闲鱼佣金页面开启" data-off="闲鱼佣金页面关闭" checked data-toggle="toggle"
                                                   data-size="mini"/>
                                    </span>
                                </div>
                                <div class="input-group" id="export_Role">
                                    <button class="btn btn-default" type="button" id="export"><i
                                            class="fa fa-download"></i> 导出
                                    </button>
                                </div>
                            </div>
                        </form>
                    </div>
                    <div class="block-flat">
                        <div class="content">
                            <div class="table-responsive">
                                <table data-classes="table table-hover table-condensed" id="dataTable"
                                       data-mobile-responsive="true" data-detail-formatter="detailFormatter">
                                </table>


                            </div>
                        </div>
                    </div>
                </div>

            </div>
        </div>
        <div class="modal fade" id="addUserModal" tabindex="-1" role="dialog" aria-labelledby="addUserModalLabel">
            <div class="modal-dialog" role="document" style="width:800px;">
                <div class="modal-content">
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
                                aria-hidden="true">&times;</span></button>
                        <h4 class="modal-title" id="addUserModalLabel">新增会员</h4>
                    </div>
                    <div class="modal-body" style="min-height:460px;">
                        <form class="form-horizontal" role="form" id="addUserForm">
                            <input type="hidden" name="JSESSIONID">
                            <input type="hidden" id="hidId" name="userId">
                            <div class="col-sm-6">
                                <div class="form-group">
                                    <label for="userAccountUpdate" class="col-sm-4 control-label"><span
                                            class="text-danger">*</span>会员编号</label>
                                    <div class="col-sm-7">
                                        <input type="text" class="form-control"
                                               id="userAccountUpdate" name="account">
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label for="userNameUpdate" class="col-sm-4 control-label"><span
                                            class="text-danger">*</span>会员名称</label>
                                    <div class="col-sm-7">
                                        <input type="text" class="form-control"
                                               id="userNameUpdate" name="supInfo.name">
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label for="notifyUrl" class="col-sm-4 control-label">回调地址</label>
                                    <div class="col-sm-7">
                                        <input type="text" class="form-control" name="notifyUrl"
                                               id="notifyUrl">
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label for="userStatus" class="col-sm-4 control-label"><span
                                            class="text-danger">*</span>会员状态</label>
                                    <div class="col-sm-7">
                                        <select class="form-control" name="status" id="userStatus">
                                            <option value="0">关闭</option>
                                            <option value="1" selected="selected">开启</option>
                                        </select>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label for="apiState" class="col-sm-4 control-label"><span
                                            class="text-danger">*</span>接口状态</label>
                                    <div class="col-sm-7">
                                        <select class="form-control" name="apiState" id="apiState">
                                            <Option value="0" selected="selected">关闭</Option>
                                            <Option value="1">开启</Option>
                                        </select>
                                    </div>
                                </div>

                                <!--<div class="form-group">-->
                                <!--<label for="ip" class="col-sm-4 control-label"><span-->
                                <!--class="text-danger"></span>绑定IP</label>-->
                                <!--<div class="col-sm-7">-->
                                <!--<input type="text" class="form-control" name="ip"-->
                                <!--id="ip">-->
                                <!--</div>-->
                                <!--</div>-->
                                <div class="form-group">
                                    <label for="userType" class="col-sm-4 control-label"><span
                                            class="text-danger"></span>用户来源</label>
                                    <div class="col-sm-7">
                                        <select class="form-control" id="userType" name="type">
                                            <option value="0" selected="selected">web</option>
                                            <option value="1">微信</option>
                                            <option value="2">app</option>
                                            <option value="3">易缴费</option>
                                        </select>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label for="supplyModel" class="col-sm-4 control-label"><span
                                            class="text-danger">*</span>销卡模板</label>
                                    <div class="col-sm-7">
                                        <select class="form-control" id="editSupplyModel" name="supplyModel">
                                        </select>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label for="userKey" class="col-sm-4 control-label"><span
                                            class="text-danger"></span>会员秘钥</label>
                                    <div class="col-sm-7">
                                        <input type="text" class="form-control" name="userKey"
                                               id="userKey">
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label for="entityLimit" class="col-sm-4 control-label"><span
                                            class="text-danger"></span>限额类型</label>
                                    <div class="col-sm-7">
                                        <select class="form-control" id="entityLimit"
                                                name="entityLimit">
                                            <option value="true">实体卡</option>
                                            <option value="false">电子卡</option>
                                        </select>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label for="dailySupplyLimit" class="col-sm-4 control-label"><span
                                            class="text-danger">*</span>每日提卡限额</label>
                                    <div class="col-sm-7">
                                        <input type="text" class="form-control" name="dailySupplyLimit"
                                               id="dailySupplyLimit">
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label for="ip" class="col-sm-2 control-label">绑定IP</label>
                                    <div class="col-sm-8">
                                    <textarea type="text" class="form-control" id="ip" placeholder="请输入IP,多个IP以;隔开"
                                              style="width: 600px;"
                                              name="ip"></textarea>
                                    </div>
                                </div>

                                <div class="form-group">
                                    <label for="remark" class="col-sm-2 control-label">备注</label>
                                    <div class="col-sm-8">
                                    <textarea type="text" class="form-control" id="remark" placeholder="请输入备注"
                                              style="width: 600px;"
                                              name="supInfo.remark"></textarea>
                                    </div>
                                </div>
                            </div>
                            <div class="col-sm-6">
                                <div class="form-group">
                                    <label for="userPmName" class="col-sm-4 control-label">客户负责人</label>
                                    <div class="col-sm-7">
                                        <input type="text" class="form-control"
                                               id="userPmName" name="userPm.name">
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label for="realName" class="col-sm-4 control-label">真实姓名</label>
                                    <div class="col-sm-7">
                                        <input type="text" class="form-control" name="supInfo.realName"
                                               id="realName">
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label for="area" class="col-sm-4 control-label">地址</label>
                                    <div class="col-sm-7">
                                        <input type="text" class="form-control" name="supInfo.address" id="area">
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label for="phone" class="col-sm-4 control-label">手机号码</label>
                                    <div class="col-sm-7">
                                        <input type="text" class="form-control" name="supInfo.phone" id="phone">
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label for="qq" class="col-sm-4 control-label">QQ</label>
                                    <div class="col-sm-7">
                                        <input type="text" class="form-control" name="supInfo.qq" id="qq">
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label for="wangwang" class="col-sm-4 control-label">旺旺</label>
                                    <div class="col-sm-7">
                                        <input type="text" class="form-control" name="supInfo.wangwang" id="wangwang">
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label for="email" class="col-sm-4 control-label">邮箱</label>
                                    <div class="col-sm-7">
                                        <input type="text" class="form-control" name="supInfo.email" id="email">
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label for="idNumber" class="col-sm-4 control-label"><span
                                            class="text-danger"></span>证件号码</label>
                                    <div class="col-sm-7">
                                        <input type="text" class="form-control" name="supInfo.idNumber"
                                               id="idNumber">
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label for="idType" class="col-sm-4 control-label"><span
                                            class="text-danger"></span>证件类型</label>
                                    <div class="col-sm-7">
                                        <input type="text" class="form-control" name="supInfo.idType"
                                               id="idType">
                                    </div>
                                </div>
                            </div>


                        </form>
                    </div>
                    <div class="modal-footer" style="margin-top: 193px;">
                        <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
                        <button type="button" class="btn btn-primary" id="addUserSubmit">确定</button>
                    </div>
                </div>
            </div>
        </div>
        <!--修改会员权限信息-->
        <div class="modal fade" id="updateUserModal" tabindex="-1" role="dialog" aria-labelledby="updateUserModalLabel">
            <div class="modal-dialog" role="document" style="width:800px;">
                <div class="modal-content">
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
                                aria-hidden="true">&times;</span></button>
                        <h4 class="modal-title" id="updateUserModalLabel">修改会员权限</h4>
                    </div>
                    <div class="modal-body" style="min-height:225px;">
                        <form class="form-horizontal" role="form" id="updateUserForm">
                            <input type="hidden" name="JSESSIONID">
                            <input type="hidden" id="updateHidId" name="userId">
                            <div class="col-sm-6">
                                <div class="form-group">
                                    <label for="supplyState" class="col-sm-4 control-label"><span
                                            class="text-danger"></span>供卡权限 </label>
                                    <div class="col-sm-7">
                                        <select class="form-control" name="supplyState" id="supplyState">
                                            <Option value="0">关闭</Option>
                                            <Option value="1">开启</Option>
                                        </select>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label for="withdrawState" class="col-sm-4 control-label"><span
                                            class="text-danger"></span>提现权限</label>
                                    <div class="col-sm-7">
                                        <select class="form-control" name="withdrawState" id="withdrawState">
                                            <Option value="0">关闭</Option>
                                            <Option value="1">开启</Option>
                                        </select>
                                    </div>
                                </div>

                            </div>
                            <div class="col-sm-6">
                                <div class="form-group">
                                    <label for="postPaid" class="col-sm-4 control-label"><span
                                            class="text-danger"></span>后付费权限</label>
                                    <div class="col-sm-7">
                                        <select class="form-control" name="postPaid" id="postPaid">
                                            <Option value="0">关闭</Option>
                                            <Option value="1">开启</Option>
                                        </select>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label for="popUp" class="col-sm-4 control-label"><span
                                            class="text-danger"></span>弹窗权限</label>
                                    <div class="col-sm-7">
                                        <select class="form-control" name="popUp" id="popUp">
                                            <Option value="0">关闭</Option>
                                            <Option value="1">开启</Option>
                                        </select>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label for="popUp" class="col-sm-4 control-label"><span
                                            class="text-danger"></span>支付宝权限</label>
                                    <div class="col-sm-7">
                                        <select class="form-control" name="alipayWithdraw" id="alipayWithdraw">
                                            <Option value="0">关闭</Option>
                                            <Option value="1">开启</Option>
                                        </select>
                                    </div>
                                </div>
                            </div>

                        </form>
                    </div>
                    <div class="modal-footer">
                        <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
                        <button type="button" class="btn btn-primary" id="updateUserSubmit">确定</button>
                    </div>
                </div>
            </div>
        </div>
        <!--修改会员权益信用分-->
        <div class="modal fade" id="updateEquityCreditModal" tabindex="-1" role="dialog"
             aria-labelledby="updateUserModalLabel">
            <div class="modal-dialog" role="document" style="width:800px;">
                <div class="modal-content">
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
                                aria-hidden="true">&times;</span></button>
                        <h4 class="modal-title" id="updateQuityCreditModalLabel">修改权益信用分</h4>
                    </div>
                    <div class="modal-body" style="min-height:185px;">
                        <form class="form-horizontal" role="form" id="updateEquityCreditForm">
                            <div class="col-sm-6">
                                <div class="form-group">
                                    <label for="userAccountUpdate" class="col-sm-4 control-label"><span
                                            class="text-danger">*</span>权益信用分</label>
                                    <div class="col-sm-7">
                                        <input type="text" class="form-control"
                                               id="equityCredit" name="equityCredit">
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label for="userAccountUpdate" class="col-sm-4 control-label"><span
                                            class="text-danger">*</span>原因</label>
                                    <div class="col-sm-7">
                                        <input type="text" class="form-control"
                                               id="editRemark" name="remark">
                                    </div>
                                </div>
                            </div>
                        </form>
                    </div>
                    <div class="modal-footer">
                        <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
                        <button type="button" class="btn btn-primary" id="updateEquityCreditSubmit">确定</button>
                    </div>
                </div>
            </div>
        </div>
        <!--审核供卡申请-->
        <div class="modal fade" id="cardApplyModal" tabindex="-1" role="dialog" aria-labelledby="updateUserModalLabel">
            <div class="modal-dialog" role="document" style="width:400px;">
                <div class="modal-content">
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
                                aria-hidden="true">&times;</span></button>
                        <h4 class="modal-title">审核供卡申请</h4>
                    </div>
                    <div class="modal-body" style="min-height:90px;">
                        <form class="form-horizontal" role="form" id="cardApplyForm">
                            <input type="hidden" class="form-control" name="userId">
                            <div class="form-group">
                                <label for="userAccountUpdate" class="col-sm-4 control-label"><span
                                        class="text-danger">*</span>审核状态:</label>
                                <div class="col-sm-7">
                                    <select class="form-control" name="apply">
                                        <Option value="">审核状态</Option>
                                        <Option value="SUCCESS">审核通过</Option>
                                        <Option value="FAIL">审核失败</Option>
                                    </select>
                                </div>
                            </div>
                            <div class="form-group">
                                <label for="userAccountUpdate" class="col-sm-4 control-label">审核备注:</label>
                                <div class="col-sm-7">
                                    <input type="text" class="form-control" name="remark">
                                </div>
                            </div>
                        </form>
                    </div>
                    <div class="modal-footer">
                        <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
                        <button type="button" class="btn btn-primary" id="cardApplySubmit">确定</button>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<div th:include="js :: js"></div>
<script type="text/javascript" th:attr="src=@{/js/jquery.form.js}"></script>
<script type="text/javascript" th:attr="src=@{/js/jquery.parser.js}"></script>
<script type="text/javascript" src="js/jquery.icheck/icheck.min.js"></script>
<script type="text/javascript" src="/js/pageJs/memberManage/userList.js?deVersion=2020081002"></script>
<script>
    var accountName = GetQueryString("accountName");
    var userIds = GetQueryString("userIds");
    if (accountName != null && accountName != '') {
        $("#userName").val(decodeURI(accountName));
        $("#search").click();
    }
    if (userIds != null && userIds != '') {
        $("#userIds").val(userIds);
        $("#search").click();
    }
</script>
</body>
</html>
